home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
choice17.zip
/
CHOICE.DOC
< prev
next >
Wrap
Text File
|
1990-03-10
|
15KB
|
399 lines
C H O I C E
by
Michael L. Wilson
version 1.7
March 10, 1990
Copyright (c) 1990
Compufax Computer Systems
1840 41st Avenue
Suite 102-124
Capitola, CA 95010
408-479-7702
CHOICE page i
T A B L E O F C O N T E N T S
I. Introduction..................................1
II. Usage.........................................1
III. Revision Hostory..............................x
IV. Acknowledgements..............................x
V. License, Limits, Disclaimer...................x
CHOICE page 1
INTRODUCTION:
What is Choice?
Choice is a program that allows users to answer questions in batch
files. Unlike the other "ASK" type programs in the market, CHOICE
has many more features:
Use any prompt you desire
Only accept desired letters for input
Display a file above the prompt (for menus)
On-line help
User definable color
Place the prompt ANYWHERE on the screen
Timeouts
Default choice when return or spacebar is pressed
Shows, if desired, the acepted letters, default choice
and timeout.
Set Type-Ahead buffer
Set the system errorlevel to the position of the pressed
key in the list.
USAGE:
The Syntax for CHOICE is:
CHOICE prompt letters [options]
The prompt can be any character string. If there are embedded spaces,
the prompt must be enclosed in quotes.
EXAMPLE: "Enter your Choice >>"
Letters is a list of the letters that are acceptable. If the list has
embedded spaces, it must be enclosed in quotes.
EXAMPLE: ABCDEFG
The acceptable options are:
FILE=filename
COLOR=fore,back
WHERE=row,col
TIMEOUT=seconds
DEFAULT=letter
KEYS=length of buffer
SHOW
When the user presses a key, and it is part of the list, then the
system errorlevel is set to the position of that letter in the list.
EXAMPLE: If the list was ABCD and the user pressed C then the system
errorlevel would be set to 3.
CHOICE page 2
The Options Explained:
FILE: The FILE= option must immediatly be followed by a legal
DOS filename, with no spaces. This file will be displayed
on the screen before the prompt. If the file is longer
than your screen length, your screen will scroll. The
file is displayed in the color specified by the COLOR=
option.
EXAMPLE: FILE=menu.dat
COLOR: The COLOR= option will determin ethe color of the prompt
and the displayed file. The foreground and background
colors must immediatly follow the equal sign, with no
spaces. These numbers are separated by a comma. The
colors are represented by numbers. The foreground must
be a number between 0 and 15. The background must be a
number between 0 and 15. The background numbers 0-7 are
the normal background colors. The background numbers
8-15 are a repeat of the 0-7 list but cause the current
forground color to blink. See Appendix A for a list
of these numbers and colors.
EXAMPLE: COLOR=12,5
WHERE: The WHERE= option determines where the prompt will be
located on the screen. The row and column number must
immediatly follow the equal sign with no spaces. The
row and column number are separated by a comma.
EXAMPLE: WHERE=5,15
TIMEOUT:The TIMEOUT= option determines the number of seconds
before the prompt times out and the default is chosen.
The number of seconds must come immediatly after the
equal sign with no spaces.
EXAMPLE: TIMEOUT=30
DEFAULT:The DEFAULT= option determines which letter is automatically
chosen when the prompt times out, the spacebar is ressed,
or the Return key is pressed. The single letter default
must immediatly follow the equal sign. It must also be
part of the letters list.
EXAMPLE: DEFAULT=A
KEYS: The KEYS= options sets the length of the type ahead buffer.
The number of type ahead keys must come immediatly after
the equal sign. If the number is greater than the current
type ahead buffer, then KEYS is set to the current buffer's
size.
EXAMPLE: KEYS=3
SHOW: The SHOW options has no parameters. If used, it will
display the acceptable keys, the timeout (if any) and
the default key (if any).
EXAMPLE: SHOW
CHOICE page 3
REVISION HISTORY
version 1.6 1-24-90
First Shareware release
version 1.7 3-10-90
Demo batch file included in archive
Fixed a random error due to reading way past command line
CHOICE page 4
LICENSE
This version of CHOICE is NOT public domain nor free software, but
is being distributed as "shareware".
CHOICE is copyright (C) 1990 by Compufax Computer Systems.
Non-registered users of this software are granted a limited
license to make an evaluation copy for trial use on a private,
non-commercial basis, for the express purpose of determining
whether CHOICE is suitable for their needs. At the end of this
trial period, you should either register your copy or
discontinue using CHOICE.
What does all this really mean? If you use this program, then
you should pay for your copy. That way we'll be able to provide
you support, updates and stay in business.
A CHOICE registration entitles you to use the program on any and
all computers available to you, with the following restriction:
If other people have access to this program or may use it, then
you should purchase a site license. See the following section
for information about site licensing or quantity discounts.
All users are granted a limited license to copy CHOICE only for
the trial use of others and subject to the above limitations.
This license does NOT include distribution or copying of this
software package:
1. In connection with any other product or service.
2. For general use within a company or institution.
3. For any consideration or 'disk fee'.
4. Distribution in modified form, i.e., the file containing
this license information MUST be included, along with the